package com.example.administrator.reader.activity;

import android.app.Activity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.example.administrator.reader.R;
import com.example.administrator.reader.core.BaseActivity;
import com.example.administrator.reader.utils.Constants;

public class SettingActivity extends BaseActivity {

    private TextView tv_logout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void setUpContentView() {
        setContentView(R.layout.activity_setting, R.string.setting);
    }

    @Override
    protected void setUpView() {
        tv_logout = (TextView) findViewById(R.id.tv_logout);
    }

    @Override
    protected void setUpData(Bundle savedInstanceState) {
        tv_logout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                setResult(Constants.resultCodeLogout);
                finish();
            }
        });
    }
}
